/**
 * Hex - Hex shape
 */
include(['shapes.Mesh', 'Vector2', 'shapes.Triangle'], function(){
	
	declare('shapes.Hex');
	Hex = Mesh.extend({
		width  : 35,
		height : 15,
		init   : function(p1, p2, p3, p4, p5, p6){
			this._super(p1,p2,p3,p4,p5,p6);
		}
	}, 'Hex');
	Hex.createCell = function(x, y, width, height){
		width  = width  || 35;
		height = height || 15;
	
		x = x * (width*2) + (y % 2 ? width : 0);
		y = y * height;
		
		var p1 = new Vector2( x , y+13 )
		var p2 = new Vector2( x+10, y);
		var p3 = new Vector2( x+35, y);
		var p4 = new Vector2( x+48, y+13);
		var p5 = new Vector2( x+35, y+29);
		var p6 = new Vector2( x+10, y+29);
		return new Hex(p1,p2,p3,p4,p5,p6);
	};
});